package cn.itsource.system.controller;

import cn.itsource.basic.utils.AjaxResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotBlank;

@RestController
@RequestMapping("/test")
@Validated
public class TestController {

    @GetMapping
    public AjaxResult test(@NotBlank(message = "name不能为空") String name){
        System.out.println(name);
        return new AjaxResult();
    }
}
